![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@allmaps/annotation
Advanced tools
Functions for generating and parsing IIIF georeference annotations
@allmaps/annotation is a JavaScript module that can generate and parse Georeference Annotations.
A Georeference Annotation is a Web Annotation that stores the metadata needed to georeference a IIIF image.
A Georeference Annotation contains the following data:
Georeference Annotations are a core part of Allmaps. For example, Allmaps Viewer can warp maps IIIF maps in the browser, just by loading a georeference annotation.
This is an ESM-only module that works in browsers and Node.js.
Node.js:
First, run npm install @allmaps/annotation
to add this module to your project.
import { parseAnnotation, generateAnnotation } from '@allmaps/annotation'
Browser:
<script type="module">
import {
parseAnnotation,
generateAnnotation
} from 'https://unpkg.com/@allmaps/annotation?module'
</script>
Parses a Georeference Annotation or an AnnotationPage containing multiple Georeference Annotations and returns an array of maps.
annotation
(Annotation | AnnotationPage) Georeference Annotation or AnnotationPage containing multiple Georeference Annotationsimport fs from 'fs'
import { parseAnnotation } from '@allmaps/annotation'
const annotation = JSON.parse(fs.readFileSync('./examples/annotation.example.json'))
const maps = parseAnnotation(annotation)
Returns Array<Map> Array of maps
Generates a Georeference Annotation from a single map or an AnnotationPage containing multiple Georeference Annotations from an array of maps.
import fs from 'fs'
import { generateAnnotation } from '@allmaps/annotation'
const map = JSON.parse(fs.readFileSync('./examples/map.example.json'))
const annotation = generateAnnotation(map)
Returns (Annotation | AnnotationPage) Georeference Annotation
The two types this module converts between, Annotation, AnnotationPage and Map, are described below.
Object that contains the data needed to georeference a IIIF resource in the format that is used by Allmaps internally.
Type: Object
Web Annotation that contains a single Georeference Annotation.
Type: Object
An Annotation Page that contains multiple Georeference Annotations.
Type: Object
FAQs
Functions for generating and parsing IIIF georeference annotations
The npm package @allmaps/annotation receives a total of 113 weekly downloads. As such, @allmaps/annotation popularity was classified as not popular.
We found that @allmaps/annotation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.